home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / iso9660 / mail / sendmail / 565_ida.pat next >
Encoding:
Text File  |  1991-08-11  |  36.3 KB  |  1,313 lines

  1. Newsgroups: comp.mail.sendmail
  2. Subject: sendmail-5.65c+IDA-1.4.4 patch kit
  3. Reply-To: Paul-Pomes@uiuc.edu
  4.  
  5. This patch kit corrects a number of problems encountered with the latest
  6. release of the UIUC/NIU version of the IDA sendmail kit.
  7.  
  8. Files in the ida/aux directory now include just sendmail.h instead of the
  9. previous morass.
  10.  
  11. Includes a sample ida/cf/M4/{athena.m4,mailers.ptx} files for use on
  12. Sequent PTX machines.
  13.  
  14. ida/cf/Sendmail.mc has an important fix applied that corrects an argument
  15. mis-match.
  16.  
  17. Previously posted fixes to the QSELREF patch included.
  18.  
  19. All non-fatal syslog() calls have been eliminated prior to the freeze()
  20. operation.  This permits freeze file operation on additional systems.
  21.  
  22. The last char of a string returned by yp_match() is zapped only if it's
  23. a newline.
  24.  
  25. New logdelivery() routine copes with small syslog() buffers and with
  26. limited number of arguments permitted in syslog().
  27.  
  28. Apply this patch by saving to a file, cd to just above the sendmail source
  29. directory, and then feed this file to patch ala
  30.  
  31.     patch -p0 < thisfile
  32.  
  33. /pbp
  34. ====
  35. diff -r -c -b sendmail-5.65c/ida/aux/Makefile sendmail/ida/aux/Makefile
  36. *** sendmail-5.65c/ida/aux/Makefile    Tue Mar  5 11:51:42 1991
  37. --- sendmail/ida/aux/Makefile    Tue Jul  2 12:32:53 1991
  38. ***************
  39. *** 9,19 ****
  40.   #
  41.   
  42.   BINS=        dbm mkdomext scanf xalparse
  43. ! CFLAGS=        -O -DVMUNIX -I$(INCLUDEDIR)
  44.   
  45.   #  The following definitions are inserted by ../Makefile
  46.   #  Change them there--not here!
  47. ! CC=        gcc -ansi -Dvax -fpcc-struct-return -fstrength-reduce
  48.   BINDIR=        /usr/local/bin
  49.   LIBDIR=        /usr/local/lib/mail
  50.   SRCDIR=        ../../src
  51. --- 9,19 ----
  52.   #
  53.   
  54.   BINS=        dbm mkdomext scanf xalparse
  55. ! CFLAGS=        -O -I$(INCLUDEDIR)
  56.   
  57.   #  The following definitions are inserted by ../Makefile
  58.   #  Change them there--not here!
  59. ! CC=        cc
  60.   BINDIR=        /usr/local/bin
  61.   LIBDIR=        /usr/local/lib/mail
  62.   SRCDIR=        ../../src
  63. diff -r -c -b sendmail-5.65c/ida/aux/dbm.c sendmail/ida/aux/dbm.c
  64. *** sendmail-5.65c/ida/aux/dbm.c    Tue Jun 25 17:50:29 1991
  65. --- sendmail/ida/aux/dbm.c    Mon Jul  1 11:29:11 1991
  66. ***************
  67. *** 6,45 ****
  68.   **  Use it, abuse it, but don't sell it.
  69.   */
  70.   
  71. ! #include "useful.h"
  72. ! #include <stdio.h>
  73. ! #include <ctype.h>
  74. ! #include <sys/file.h>
  75. ! #ifndef LOCK_EX
  76. ! # include "flock.h"
  77. ! #endif /* !LOCK_EX */
  78.   
  79. - #ifdef GDBM
  80. - # define OTHERDBM
  81. - # include <ndbm.h>        /* DBM is typedef'ed here */
  82. - #endif /* GDBM */
  83. - #ifdef SDBM
  84. - # ifdef OTHERDBM
  85. -    MULTIPLE_DBM_TYPES_DEFINED
  86. - # else
  87. - #  define OTHERDBM
  88. - #  include <sdbm.h>        /* DBM is typedef'ed here */
  89. - # endif /* OTHERDBM */
  90. - #endif /* SDBM */
  91. - #ifndef OTHERDBM
  92. - # undef DBM            /* while including ndbm.h */
  93. - # include <ndbm.h>        /* DBM is typedef'ed here */
  94. - #endif /* !OTHERDBM */
  95. - #define DBMFILE DBM
  96.   #define DB_DIREXT    ".dir"
  97.   #define DB_PAGEXT    ".pag"
  98.   
  99.   #ifndef lint
  100.   static char    SccsId[] = "@(#)dbm.c 2.2 (lel@ida.liu.se) 10/24/88";
  101. ! static char    Rcsid[] = "@(#)$Id: dbm.c,v 1.11 1991/06/25 23:50:15 paul Exp $";
  102.   #endif /* !lint */
  103.   
  104.   #define    SAMECASE    0
  105. --- 6,19 ----
  106.   **  Use it, abuse it, but don't sell it.
  107.   */
  108.   
  109. ! #include "sendmail.h"
  110.   
  111.   #define DB_DIREXT    ".dir"
  112.   #define DB_PAGEXT    ".pag"
  113.   
  114.   #ifndef lint
  115.   static char    SccsId[] = "@(#)dbm.c 2.2 (lel@ida.liu.se) 10/24/88";
  116. ! static char    Rcsid[] = "@(#)$Id: dbm.c,v 1.12 1991/07/01 17:28:32 paul Exp $";
  117.   #endif /* !lint */
  118.   
  119.   #define    SAMECASE    0
  120. diff -r -c -b sendmail-5.65c/ida/aux/header.c sendmail/ida/aux/header.c
  121. *** sendmail-5.65c/ida/aux/header.c    Tue Jun 25 17:50:32 1991
  122. --- sendmail/ida/aux/header.c    Mon Jul  1 11:29:15 1991
  123. ***************
  124. *** 8,25 ****
  125.   **  Version of 14-Apr-85.
  126.   */
  127.   
  128. ! #include <stdio.h>
  129. ! #include <sys/types.h>
  130. ! #include <strings.h>
  131. ! #include <ctype.h>
  132. ! #include "useful.h"
  133.   
  134. ! #define H_CC        "cc"
  135. ! #define H_FROM        "from"
  136. ! #define H_MESSAGE_ID    "message_id"
  137. ! #define H_RETURN_PATH    "return-path"
  138. ! #define H_TO        "to"
  139. ! #define H_VIA        "via"
  140.   
  141.   #define COMMA    ','
  142.   
  143. --- 8,21 ----
  144.   **  Version of 14-Apr-85.
  145.   */
  146.   
  147. ! #include "sendmail.h"
  148.   
  149. ! #define HH_CC        "cc"
  150. ! #define HH_FROM        "from"
  151. ! #define HH_MESSAGE_ID    "message_id"
  152. ! #define HH_RETURN_PATH    "return-path"
  153. ! #define HH_TO        "to"
  154. ! #define HH_VIA        "via"
  155.   
  156.   #define COMMA    ','
  157.   
  158. ***************
  159. *** 26,32 ****
  160.   #define MAKELC(C)    (isupper(C) ? tolower(C) : C)
  161.   
  162.   #ifndef lint
  163. ! static char    Rcsid[] = "@(#)$Id: header.c,v 1.3 1991/06/25 23:50:15 paul Exp $";
  164.   #endif /* !lint */
  165.   
  166.   #ifdef __STDC__
  167. --- 22,28 ----
  168.   #define MAKELC(C)    (isupper(C) ? tolower(C) : C)
  169.   
  170.   #ifndef lint
  171. ! static char    Rcsid[] = "@(#)$Id: header.c,v 1.4 1991/07/01 17:28:32 paul Exp $";
  172.   #endif /* !lint */
  173.   
  174.   #ifdef __STDC__
  175. diff -r -c -b sendmail-5.65c/ida/aux/mkdomext.c sendmail/ida/aux/mkdomext.c
  176. *** sendmail-5.65c/ida/aux/mkdomext.c    Wed Mar  6 12:11:09 1991
  177. --- sendmail/ida/aux/mkdomext.c    Mon Jul  1 11:36:24 1991
  178. ***************
  179. *** 6,14 ****
  180.   **  Use it, abuse it, but don't sell it.
  181.   */
  182.   
  183. ! #include "useful.h"
  184. ! #include <stdio.h>
  185. ! #include <ctype.h>
  186.   
  187.   #ifndef lint
  188.   static char    SccsId[] = "@(#)mkdomext.c 1.5 (lel@ida.liu.se) 4/24/87";
  189. --- 6,12 ----
  190.   **  Use it, abuse it, but don't sell it.
  191.   */
  192.   
  193. ! #include "sendmail.h"
  194.   
  195.   #ifndef lint
  196.   static char    SccsId[] = "@(#)mkdomext.c 1.5 (lel@ida.liu.se) 4/24/87";
  197. diff -r -c -b sendmail-5.65c/ida/aux/rmail.c sendmail/ida/aux/rmail.c
  198. *** sendmail-5.65c/ida/aux/rmail.c    Tue Jun 25 17:50:33 1991
  199. --- sendmail/ida/aux/rmail.c    Mon Jul  1 11:29:28 1991
  200. ***************
  201. *** 24,59 ****
  202.   */
  203.   
  204.   #ifndef lint
  205. ! static char    Rcsid[] = "@(#)$Id: rmail.c,v 1.6 1991/06/25 23:50:15 paul Exp $";
  206.   #endif /* !lint */
  207.   
  208. ! #include <stdio.h>
  209. ! #include <sys/types.h>
  210. ! #include <fcntl.h>
  211. ! #include <ctype.h>
  212. ! #include <sys/time.h>
  213. ! #include <strings.h>
  214. ! #include "useful.h"
  215. ! #ifdef GDBM
  216. ! # define OTHERDBM
  217. ! # include <ndbm.h>        /* DBM is typedef'ed here */
  218. ! #endif /* GDBM */
  219. ! #ifdef SDBM
  220. ! # ifdef OTHERDBM
  221. !    MULTIPLE_DBM_TYPES_DEFINED
  222. ! # else
  223. ! #  define OTHERDBM
  224. ! #  include <sdbm.h>        /* DBM is typedef'ed here */
  225. ! # endif /* OTHERDBM */
  226. ! #endif /* SDBM */
  227. ! #ifndef OTHERDBM
  228. ! # undef DBM            /* while including ndbm.h */
  229. ! # include <ndbm.h>        /* DBM is typedef'ed here */
  230. ! #endif /* !OTHERDBM */
  231. ! #define DBMFILE DBM
  232.   #define DB_DIREXT    ".dir"
  233.   #define DB_PAGEXT    ".pag"
  234.   
  235. --- 24,34 ----
  236.   */
  237.   
  238.   #ifndef lint
  239. ! static char    Rcsid[] = "@(#)$Id: rmail.c,v 1.7 1991/07/01 17:28:32 paul Exp $";
  240.   #endif /* !lint */
  241.   
  242. ! #include "sendmail.h"
  243.   #define DB_DIREXT    ".dir"
  244.   #define DB_PAGEXT    ".pag"
  245.   
  246. ***************
  247. *** 66,77 ****
  248.   #define DEFAULT_DOMAIN    "UUCP"
  249.   /* #define DOMAINTABLE    "/usr/lib/mail/domaintable" */
  250.   
  251. ! #define H_CC        "cc"
  252. ! #define H_FROM        "from"
  253. ! #define H_MESSAGE_ID    "message_id"
  254. ! #define H_RETURN_PATH    "return-path"
  255. ! #define H_TO        "to"
  256. ! #define H_VIA        "via"
  257.   
  258.   #define MAKELC(C)    (isupper(C) ? tolower(C) : C)
  259.   #define EATSPACE(P)    while (*P == ' ') P++
  260. --- 41,52 ----
  261.   #define DEFAULT_DOMAIN    "UUCP"
  262.   /* #define DOMAINTABLE    "/usr/lib/mail/domaintable" */
  263.   
  264. ! #define HH_CC        "cc"
  265. ! #define HH_FROM        "from"
  266. ! #define HH_MESSAGE_ID    "message_id"
  267. ! #define HH_RETURN_PATH    "return-path"
  268. ! #define HH_TO        "to"
  269. ! #define HH_VIA        "via"
  270.   
  271.   #define MAKELC(C)    (isupper(C) ? tolower(C) : C)
  272.   #define EATSPACE(P)    while (*P == ' ') P++
  273. ***************
  274. *** 262,269 ****
  275.   #ifdef LOGFILE
  276.       if (logf != NULL && insideheader &&
  277.           ((printedlast && isspace(*s)) ||
  278. !          iskey(H_FROM, s) || iskey(H_TO, s) || iskey(H_CC, s) ||
  279. !          iskey(H_RETURN_PATH, s) || iskey(H_MESSAGE_ID, s))) {
  280.            (void) fprintf(logf, "\t%s\n", s);
  281.            printedlast = TRUE;
  282.            } else
  283. --- 237,244 ----
  284.   #ifdef LOGFILE
  285.       if (logf != NULL && insideheader &&
  286.           ((printedlast && isspace(*s)) ||
  287. !          iskey(HH_FROM, s) || iskey(HH_TO, s) || iskey(HH_CC, s) ||
  288. !          iskey(HH_RETURN_PATH, s) || iskey(HH_MESSAGE_ID, s))) {
  289.            (void) fprintf(logf, "\t%s\n", s);
  290.            printedlast = TRUE;
  291.            } else
  292. diff -r -c -b sendmail-5.65c/ida/aux/scanf.c sendmail/ida/aux/scanf.c
  293. *** sendmail-5.65c/ida/aux/scanf.c    Tue Aug 23 05:01:46 1988
  294. --- sendmail/ida/aux/scanf.c    Mon Jul  1 11:36:27 1991
  295. ***************
  296. *** 8,16 ****
  297.   **  Very simple version 0.11 of Tue Aug 23 12:01:10 BST 1988
  298.   */
  299.   
  300. ! #include "useful.h"
  301. ! #include <stdio.h>
  302. ! #include <ctype.h>
  303.   
  304.   main(argc, argv)
  305.       int argc;
  306. --- 8,14 ----
  307.   **  Very simple version 0.11 of Tue Aug 23 12:01:10 BST 1988
  308.   */
  309.   
  310. ! #include "sendmail.h"
  311.   
  312.   main(argc, argv)
  313.       int argc;
  314. ***************
  315. *** 31,37 ****
  316.       }
  317.   
  318.       if (ignore_case)
  319. !     lower(argv[1]);
  320.   
  321.       if (argc == 2)
  322.       input = stdin;
  323. --- 29,35 ----
  324.       }
  325.   
  326.       if (ignore_case)
  327. !     lowerit(argv[1]);
  328.   
  329.       if (argc == 2)
  330.       input = stdin;
  331. ***************
  332. *** 45,57 ****
  333.   
  334.       while (fgets(buf, sizeof(buf), input) != NULL) {
  335.       if (ignore_case)
  336. !         lower(buf);
  337.       if (sscanf(buf, argv[1], val) == 1)
  338.           puts(val);
  339.       }
  340.   }
  341.   
  342. ! lower(p)
  343.       register char *p;
  344.   {
  345.       for (; *p != '\0'; p++)
  346. --- 43,55 ----
  347.   
  348.       while (fgets(buf, sizeof(buf), input) != NULL) {
  349.       if (ignore_case)
  350. !         lowerit(buf);
  351.       if (sscanf(buf, argv[1], val) == 1)
  352.           puts(val);
  353.       }
  354.   }
  355.   
  356. ! lowerit(p)
  357.       register char *p;
  358.   {
  359.       for (; *p != '\0'; p++)
  360. diff -r -c -b sendmail-5.65c/ida/aux/xalparse.c sendmail/ida/aux/xalparse.c
  361. *** sendmail-5.65c/ida/aux/xalparse.c    Fri Mar 22 09:42:31 1991
  362. --- sendmail/ida/aux/xalparse.c    Fri Jul 12 22:40:44 1991
  363. ***************
  364. *** 6,17 ****
  365.   **  Use it, abuse it, but don't sell it.
  366.   */
  367.   
  368. ! #include "useful.h"
  369. ! #include <stdio.h>
  370. ! #include <ctype.h>
  371.   
  372.   #ifndef lint
  373. ! static char    rcsid[] = "$Header: /usr1/local/src/sendmail/ida/aux/RCS/xalparse.c,v 1.2 1991/03/18 15:41:29 rickert Exp $";
  374.   #endif /* !lint */
  375.   
  376.   struct alias {
  377. --- 6,15 ----
  378.   **  Use it, abuse it, but don't sell it.
  379.   */
  380.   
  381. ! #include "sendmail.h"
  382.   
  383.   #ifndef lint
  384. ! static char    rcsid[] = "$Header: /usr/local/src/mail/sendmail/ida/aux/RCS/xalparse.c,v 1.3 1991/07/13 04:40:12 paul Exp $";
  385.   #endif /* !lint */
  386.   
  387.   struct alias {
  388. ***************
  389. *** 66,72 ****
  390.     routing_host = NULL;
  391.     Command_Name = argv[0];
  392.   
  393. !   while (*argv[1] == '-') {
  394.       if (argv[1][1] != 'r' && argv[1][1] != 't') break;
  395.       if (argv[1][1] == 'r') {
  396.           routing_host=2+argv[1];
  397. --- 64,70 ----
  398.     routing_host = NULL;
  399.     Command_Name = argv[0];
  400.   
  401. !   while (argc > 1 && *argv[1] == '-') {
  402.       if (argv[1][1] != 'r' && argv[1][1] != 't') break;
  403.       if (argv[1][1] == 'r') {
  404.           routing_host=2+argv[1];
  405. ***************
  406. *** 287,293 ****
  407.       quotedchar = FALSE;
  408.     bool i_mark, o_mark;
  409.     char buf[BUFSIZ];
  410. -   extern char *malloc();
  411.   
  412.     s = line;
  413.     d = buf;
  414. --- 285,290 ----
  415. diff -r -c -b sendmail-5.65c/ida/cf/M4/athena.m4 sendmail/ida/cf/M4/athena.m4
  416. *** sendmail-5.65c/ida/cf/M4/athena.m4    Sun Aug 11 22:17:07 1991
  417. --- sendmail/ida/cf/M4/athena.m4    Sun Aug 11 22:26:48 1991
  418. ***************
  419. *** 0 ****
  420. --- 1,12 ----
  421. + # Sendmail configuration file for network-only UIUC hosts with access to
  422. + # pseudo-domain (bitnet, csnet, etc) MX records.  No phquery support.
  423. + define(ALIASES, /usr/lib/aliases)
  424. + define(BANGIMPLIESUUCP)
  425. + dnl # define(DOMAINTABLE, LIBDIR/domaintable)
  426. + define(FORCE_NAMED)
  427. + define(LOCAL_MAILER_DEF, M4/mailers.ptx)dnl ### Sequent Symmetry / ptx settings
  428. + define(PSEUDODOMAINS, JUNET MAILNET UUCP)
  429. + define(RELAY_HOST, uxc.cso.uiuc.edu)
  430. + define(RELAY_MAILER, TCP)
  431. + define(UUCPNAME, athena)
  432. + include(Sendmail.mc)
  433. diff -r -c -b sendmail-5.65c/ida/cf/M4/mailers.ptx sendmail/ida/cf/M4/mailers.ptx
  434. *** sendmail-5.65c/ida/cf/M4/mailers.ptx    Sun Aug 11 22:17:07 1991
  435. --- sendmail/ida/cf/M4/mailers.ptx    Sun Jun 30 14:18:49 1991
  436. ***************
  437. *** 0 ****
  438. --- 1,3 ----
  439. + # Mailers for Sequent / ptx systems.
  440. + Mlocal,    P=/bin/mail, F=DFMlfmns,    R=25/10, S=10, A=mail -d $u
  441. + Mprog,    P=/bin/sh,  F=DFMhlsu, R=10, S=10, A=sh -c $u
  442. diff -r -c -b sendmail-5.65c/ida/cf/Sendmail.mc sendmail/ida/cf/Sendmail.mc
  443. *** sendmail-5.65c/ida/cf/Sendmail.mc    Wed Jun 26 13:14:58 1991
  444. --- sendmail/ida/cf/Sendmail.mc    Sun Aug 11 22:28:48 1991
  445. ***************
  446. *** 1055,1061 ****
  447.   {Cw}DECNETNAME{.dnet}
  448.   
  449.   # We are a DECnet gateway.  Don't supply $u as mail11v3 speaks SMTP.
  450. ! MDmail,    P=/usr/bin/mail11v3, F=CmnXNH, S=14, R=14, A=mail11 $f $x $h
  451.   
  452.   ############################################################
  453.   #
  454. --- 1055,1061 ----
  455.   {Cw}DECNETNAME{.dnet}
  456.   
  457.   # We are a DECnet gateway.  Don't supply $u as mail11v3 speaks SMTP.
  458. ! MDmail,    P=/usr/bin/mail11v3, F=CmnXNH, S=10/14, R=14, A=mail11 $g $x $h
  459.   
  460.   ############################################################
  461.   #
  462. ***************
  463. *** 1708,1714 ****
  464.   R?<$=X$+.$=P>$+        <$1$2.$3?>$4            don't resolv pseudomain
  465.   R?<$=X$+>$+        $:<$1$[ $2 $:$2? $]>$3        First try resolver
  466.   })dnl ### End DOMAINTABLE ###
  467. ! R<$=X$w?>$+        <$1$w>$3            Accept official name.
  468.   ifdef({M4COMMENTS},{dnl
  469.   # The next three rules are intended to deal with those improperly configured
  470.   # workstations, which send out addresses of the form <user@unqualified>
  471. --- 1708,1714 ----
  472.   R?<$=X$+.$=P>$+        <$1$2.$3?>$4            don't resolv pseudomain
  473.   R?<$=X$+>$+        $:<$1$[ $2 $:$2? $]>$3        First try resolver
  474.   })dnl ### End DOMAINTABLE ###
  475. ! R<$=X$w?>$+        <$1$w>$2            Accept official name.
  476.   ifdef({M4COMMENTS},{dnl
  477.   # The next three rules are intended to deal with those improperly configured
  478.   # workstations, which send out addresses of the form <user@unqualified>
  479. diff -r -c -b sendmail-5.65c/ida/charset/Makefile sendmail/ida/charset/Makefile
  480. *** sendmail-5.65c/ida/charset/Makefile    Fri Apr  5 11:08:50 1991
  481. --- sendmail/ida/charset/Makefile    Tue Jul  2 12:31:48 1991
  482. ***************
  483. *** 20,27 ****
  484.   
  485.   all:        $(BINS) CHARDEFS cs/MNEM
  486.   
  487. ! gc:        gc.c
  488. !         $(CC) $(CFLAGS) -o $@ $<
  489.   
  490.   conv:        conv.o strcnv.o
  491.           $(CC) $(CFLAGS) -o $@ conv.o strcnv.o
  492. --- 20,27 ----
  493.   
  494.   all:        $(BINS) CHARDEFS cs/MNEM
  495.   
  496. ! gc:        gc.o
  497. !         $(CC) $(CFLAGS) -o $@ gc.o
  498.   
  499.   conv:        conv.o strcnv.o
  500.           $(CC) $(CFLAGS) -o $@ conv.o strcnv.o
  501. ***************
  502. *** 34,44 ****
  503.           ./gc
  504.   
  505.   install:    all
  506.           -mkdir $(LIBDIR)/char
  507.           tar cf - CHAR* CONTROL ISO* OTHER -C cs . | (cd $(LIBDIR)/char; tar xf -)
  508.   
  509.   clean:
  510. !         -rm -f \#* *~ *.o $(BINS) CHARDEFS cs/*
  511.   
  512.   .c.o:
  513.           $(CC) $(CFLAGS) -c $<
  514. --- 34,45 ----
  515.           ./gc
  516.   
  517.   install:    all
  518. +         -mkdir $(LIBDIR)
  519.           -mkdir $(LIBDIR)/char
  520.           tar cf - CHAR* CONTROL ISO* OTHER -C cs . | (cd $(LIBDIR)/char; tar xf -)
  521.   
  522.   clean:
  523. !         -rm -f \#* *~ *.o $(BINS) CHARMAP.10646 CHARDEFS cs/*
  524.   
  525.   .c.o:
  526.           $(CC) $(CFLAGS) -c $<
  527. diff -r -c -b sendmail-5.65c/ida/charset/conv.c sendmail/ida/charset/conv.c
  528. *** sendmail-5.65c/ida/charset/conv.c    Fri Apr  5 11:06:55 1991
  529. --- sendmail/ida/charset/conv.c    Fri Jun 28 12:41:43 1991
  530. ***************
  531. *** 4,17 ****
  532.    */
  533.   
  534.   #ifndef lint
  535. ! static char Rcsid[] = "@(#)$Header: /usr/local/src/mail/sendmail/ida/charset/RCS/conv.c,v 1.3 1991/04/05 17:06:30 paul Exp $";
  536.   
  537.   #endif
  538.   
  539.   /*
  540. !  * $Header: /usr/local/src/mail/sendmail/ida/charset/RCS/conv.c,v 1.3 1991/04/05 17:06:30 paul Exp $
  541.    *
  542.    * $Log: conv.c,v $
  543.    * Revision 1.3  1991/04/05  17:06:30  paul
  544.    * Eliminated constant strings passed as arguments.
  545.    *
  546. --- 4,20 ----
  547.    */
  548.   
  549.   #ifndef lint
  550. ! static char Rcsid[] = "@(#)$Header: /usr/local/src/mail/sendmail/ida/charset/RCS/conv.c,v 1.4 1991/06/28 18:41:20 paul Exp $";
  551.   
  552.   #endif
  553.   
  554.   /*
  555. !  * $Header: /usr/local/src/mail/sendmail/ida/charset/RCS/conv.c,v 1.4 1991/06/28 18:41:20 paul Exp $
  556.    *
  557.    * $Log: conv.c,v $
  558. +  * Revision 1.4  1991/06/28  18:41:20  paul
  559. +  * Replace older xalloc.c with new version from ../../src/util.c .
  560. +  *
  561.    * Revision 1.3  1991/04/05  17:06:30  paul
  562.    * Eliminated constant strings passed as arguments.
  563.    *
  564. ***************
  565. *** 120,130 ****
  566. --- 123,141 ----
  567.   **        Memory is allocated.
  568.   */
  569.   
  570. + #ifdef __STDC__
  571. + void *
  572. + #else /* !__STDC__ */
  573.   char *
  574. + #endif /* __STDC__ */
  575.   xalloc(sz)
  576.       register int sz;
  577.   {
  578. + #ifdef __STDC__
  579. +     register void *p;
  580. + #else /* !__STDC__ */
  581.       register char *p;
  582. + #endif /* __STDC__ */
  583.   
  584.       p = malloc((unsigned) sz);
  585.       if (p == NULL)
  586. ***************
  587. *** 133,137 ****
  588. --- 144,149 ----
  589.           abort();
  590.           /* exit(EX_UNAVAILABLE); */
  591.       }
  592. +     bzero((char *) p, sz);
  593.       return (p);
  594.   }
  595. diff -r -c -b sendmail-5.65c/ida/charset/strcnv.c sendmail/ida/charset/strcnv.c
  596. *** sendmail-5.65c/ida/charset/strcnv.c    Fri Apr  5 11:11:54 1991
  597. --- sendmail/ida/charset/strcnv.c    Fri Jun 28 12:07:02 1991
  598. ***************
  599. *** 29,35 ****
  600.   
  601.   #ifdef    BIT8
  602.   # ifndef lint
  603. ! static char RcsId[] = "@(#)$Header: /usr/local/src/mail/sendmail/ida/charset/RCS/strcnv.c,v 2.1 1991/04/05 17:11:49 paul Exp $";
  604.   # endif /* !lint */
  605.   
  606.   # ifndef MAPDIR
  607. --- 29,35 ----
  608.   
  609.   #ifdef    BIT8
  610.   # ifndef lint
  611. ! static char RcsId[] = "@(#)$Header: /usr/local/src/mail/sendmail/ida/charset/RCS/strcnv.c,v 2.2 1991/06/28 18:05:36 paul Exp $";
  612.   # endif /* !lint */
  613.   
  614.   # ifndef MAPDIR
  615. ***************
  616. *** 245,251 ****
  617.           return (NULL);
  618.   
  619.       /* Loop through the chain of character set names. */
  620. !     for (c = charsets; c && strcasecmp(c->name, s); c = c->next)
  621.           c1 = c;
  622.   
  623.       /*
  624. --- 245,251 ----
  625.           return (NULL);
  626.   
  627.       /* Loop through the chain of character set names. */
  628. !     for (c = charsets; c && strcmp(c->name, s); c = c->next)
  629.           c1 = c;
  630.   
  631.       /*
  632. diff -r -c -b sendmail-5.65c/src/Makefile sendmail/src/Makefile
  633. *** sendmail-5.65c/src/Makefile    Tue Jun 25 00:26:01 1991
  634. --- sendmail/src/Makefile    Sun Aug 11 21:25:45 1991
  635. ***************
  636. *** 15,23 ****
  637.   # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  638.   #
  639.   #    @(#)Makefile    5.11 (Berkeley) 1/3/89
  640. ! #    @(#)$Id: Makefile,v 1.14 1991/06/25 05:26:29 paul Exp $
  641.   #
  642. ! HDRS=    conf.h mailstats.h sendmail.h useful.h
  643.   SRCS=    alias.c arpadate.c clock.c collect.c conf.c convtime.c daemon.c \
  644.       deliver.c domain.c envelope.c err.c getloadavg.c headers.c \
  645.       macro.c main.c parseaddr.c queue.c readcf.c recipient.c \
  646. --- 15,23 ----
  647.   # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  648.   #
  649.   #    @(#)Makefile    5.11 (Berkeley) 1/3/89
  650. ! #    @(#)$Id: Makefile,v 1.16 1991/08/12 02:38:09 paul Exp $
  651.   #
  652. ! HDRS=    conf.h mailstats.h sendmail.h useful.h flock.h def.h
  653.   SRCS=    alias.c arpadate.c clock.c collect.c conf.c convtime.c daemon.c \
  654.       deliver.c domain.c envelope.c err.c getloadavg.c headers.c \
  655.       macro.c main.c parseaddr.c queue.c readcf.c recipient.c \
  656. ***************
  657. *** 30,35 ****
  658. --- 30,43 ----
  659.       savemail.o srvrsmtp.o stab.o stats.o sysexits.o trace.o \
  660.       usersmtp.o util.o strcnv.o flock.o setenv.o syslog.o vprintf.o \
  661.       version.o
  662. + CONFIGS = \
  663. +     config/3b1.h      config/dynix.h    config/ptx.h \
  664. +     config/aix3.h     config/hpux.h     config/riscos.h \
  665. +     config/aixrt.h    config/irix.h     config/sunos4.h \
  666. +     config/bsd43.h    config/isc.h      config/ultrix3.h \
  667. +     config/bsd44.h    config/next.h     config/ultrix4.h \
  668. +     config/convex.h   config/osx.h      config/umax.h \
  669. +     config/domainos.h 
  670.   MAN=    sendmail.0 newaliases.0 aliases.0
  671.   
  672.   SHELL=    /bin/sh
  673. ***************
  674. *** 189,194 ****
  675. --- 197,208 ----
  676.   
  677.   lint: ${SRCS}
  678.       lint -chpb -I. ${DEFS} ${SRCS}
  679. + # However we put in one default dependency, to minimize the problems of those
  680. + # who don't do a 'make depend'
  681. + $(OBJS):    $(HDRS) $(CONFIGS)
  682.   # DO NOT DELETE THIS LINE -- mkdep uses it.
  683.   # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
  684.   
  685. diff -r -c -b sendmail-5.65c/src/RELEASEDATE sendmail/src/RELEASEDATE
  686. *** sendmail-5.65c/src/RELEASEDATE    Fri Mar  8 16:54:00 1991
  687. --- sendmail/src/RELEASEDATE    Thu Jun 27 09:12:05 1991
  688. ***************
  689. *** 1,3 ****
  690. --- 1,4 ----
  691.   Tue Oct 16 10:42:26 CDT 1990
  692.   Fri Dec 14 17:55:09 CST 1990
  693.   Fri Mar  8 16:53:44 CST 1991
  694. + Wed Jun 26 10:11:39 CDT 1991
  695. diff -r -c -b sendmail-5.65c/src/alias.c sendmail/src/alias.c
  696. *** sendmail-5.65c/src/alias.c    Fri Jun 21 06:17:13 1991
  697. --- sendmail/src/alias.c    Thu Aug  8 16:13:29 1991
  698. ***************
  699. *** 38,47 ****
  700.   #ifndef lint
  701.   # ifdef DBM
  702.   static char sccsid[] = "@(#)alias.c    5.21 (Berkeley) 6/1/90 (with DBM)";
  703. ! static char rcsid[] = "@(#)$Id: alias.c,v 5.21.0.21 1991/06/21 12:16:37 paul Exp $ (with DBM)";
  704.   # else /* !DBM */
  705.   static char sccsid[] = "@(#)alias.c    5.21 (Berkeley) 6/1/90 (without DBM)";
  706. ! static char rcsid[] = "@(#)$Id: alias.c,v 5.21.0.21 1991/06/21 12:16:37 paul Exp $ (without DBM)";
  707.   # endif /* DBM */
  708.   #endif /* not lint */
  709.   
  710. --- 38,47 ----
  711.   #ifndef lint
  712.   # ifdef DBM
  713.   static char sccsid[] = "@(#)alias.c    5.21 (Berkeley) 6/1/90 (with DBM)";
  714. ! static char rcsid[] = "@(#)$Id: alias.c,v 5.21.0.23 1991/08/08 22:13:25 paul Exp $ (with DBM)";
  715.   # else /* !DBM */
  716.   static char sccsid[] = "@(#)alias.c    5.21 (Berkeley) 6/1/90 (without DBM)";
  717. ! static char rcsid[] = "@(#)$Id: alias.c,v 5.21.0.23 1991/08/08 22:13:25 paul Exp $ (without DBM)";
  718.   # endif /* DBM */
  719.   #endif /* not lint */
  720.   
  721. ***************
  722. *** 125,130 ****
  723. --- 125,133 ----
  724.           printf("%s (%s, %s) aliased to %s\n",
  725.               a->q_paddr, a->q_host, a->q_user, p);
  726.       message(Arpa_Info, "aliased to %s", p);
  727. +     /* sendtolist() will detect a possible self-reference for this alias */
  728. +     a->q_flags &= ~QSELFREF;
  729.       AliasLevel++;
  730.       sendtolist(p, a, sendq);
  731.       AliasLevel--;
  732. ***************
  733. *** 701,707 ****
  734.       if (!safefile(buf, user->q_uid, S_IREAD))
  735.           return;
  736.   
  737. !     /* we do have an address to forward to -- do it */
  738.       include(buf, "forwarding", user, sendq);
  739.   }
  740.    /*
  741. --- 704,714 ----
  742.       if (!safefile(buf, user->q_uid, S_IREAD))
  743.           return;
  744.   
  745. !     /*
  746. !      * we do have an address to forward to -- do it but
  747. !      * don't carry over selfref from alias.
  748. !      */
  749. !     user->q_flags &= ~QSELFREF;
  750.       include(buf, "forwarding", user, sendq);
  751.   }
  752.    /*
  753. diff -r -c -b sendmail-5.65c/src/arpadate.c sendmail/src/arpadate.c
  754. *** sendmail-5.65c/src/arpadate.c    Wed Jun 26 22:43:52 1991
  755. --- sendmail/src/arpadate.c    Thu Jun 27 23:53:47 1991
  756. ***************
  757. *** 20,26 ****
  758.   
  759.   #ifndef lint
  760.   static char sccsid[] = "@(#)arpadate.c    5.11 (Berkeley) 6/1/90";
  761. ! static char rcsid[] = "@(#)$Id: arpadate.c,v 5.11.0.9 1991/06/27 04:42:05 paul Exp $";
  762.   #endif /* not lint */
  763.   
  764.   #include "sendmail.h"
  765. --- 20,26 ----
  766.   
  767.   #ifndef lint
  768.   static char sccsid[] = "@(#)arpadate.c    5.11 (Berkeley) 6/1/90";
  769. ! static char rcsid[] = "@(#)$Id: arpadate.c,v 5.11.0.10 1991/06/28 05:52:38 paul Exp $";
  770.   #endif /* not lint */
  771.   
  772.   #include "sendmail.h"
  773. ***************
  774. *** 301,310 ****
  775.               p += 3;
  776.               break;
  777.           }
  778. -     /* skip over months that are spelled out, e.g., June */
  779. -     while (*p && isalpha(*p))
  780. -         p++;
  781.   
  782.       p = nextatom(p);            /* year */
  783.       tm.tm_year = atoi(p);
  784. --- 301,306 ----
  785. diff -r -c -b sendmail-5.65c/src/daemon.c sendmail/src/daemon.c
  786. *** sendmail-5.65c/src/daemon.c    Fri Jun 21 06:44:18 1991
  787. --- sendmail/src/daemon.c    Mon Aug 12 11:53:22 1991
  788. ***************
  789. *** 27,36 ****
  790.   #ifndef lint
  791.   # ifdef DAEMON
  792.   static char sccsid[] = "@(#)daemon.c    5.36 (Berkeley) 6/1/90 (with daemon mode)";
  793. ! static char rcsid[] = "@(#)$Id: daemon.c,v 5.36.0.24 1991/06/21 12:41:25 paul Exp $ (with daemon mode)";
  794.   # else /* !DAEMON */
  795.   static char sccsid[] = "@(#)daemon.c    5.36 (Berkeley) 6/1/90 (without daemon mode)";
  796. ! static char rcsid[] = "@(#)$Id: daemon.c,v 5.36.0.24 1991/06/21 12:41:25 paul Exp $ (without daemon mode)";
  797.   # endif /* DAEMON */
  798.   #endif /* not lint */
  799.   
  800. --- 27,36 ----
  801.   #ifndef lint
  802.   # ifdef DAEMON
  803.   static char sccsid[] = "@(#)daemon.c    5.36 (Berkeley) 6/1/90 (with daemon mode)";
  804. ! static char rcsid[] = "@(#)$Id: daemon.c,v 5.36.0.27 1991/08/12 17:52:32 paul Exp $ (with daemon mode)";
  805.   # else /* !DAEMON */
  806.   static char sccsid[] = "@(#)daemon.c    5.36 (Berkeley) 6/1/90 (without daemon mode)";
  807. ! static char rcsid[] = "@(#)$Id: daemon.c,v 5.36.0.27 1991/08/12 17:52:32 paul Exp $ (without daemon mode)";
  808.   # endif /* DAEMON */
  809.   #endif /* not lint */
  810.   
  811. ***************
  812. *** 554,560 ****
  813. --- 554,576 ----
  814.           Xsleep(10);
  815.       }
  816.   # else /* !NAMED_BIND */
  817. + #  ifdef sun
  818. +     /*
  819. +      *    An ugly hack.
  820. +      *    This routine is mainly called to assign a default value
  821. +      *    to $w .  As such it must be called before the config file
  822. +      *    is processed.  On Sun systems this involves calls to some
  823. +      *    of the yp lookup routines.  They apparently leave state
  824. +      *    information lying around which is inconsistent with the
  825. +      *    use of frozen configurations.  Since the standard Sun
  826. +      *    setup leaves hostnames unqualified anyway, omitting the
  827. +      *    gethostbyname() call should have little effect.
  828. +      */
  829. +     hp = NULL;
  830. + #  else /* !sun */
  831.       hp = gethostbyname(hostbuf);
  832. + #  endif /* sun */
  833.   # endif /* NAMED_BIND */
  834.       if (hp != NULL)
  835.       {
  836. ***************
  837. *** 921,929 ****
  838.               yp_match(yp_domain, &db->db_name[1], lowkey,
  839.               strlen(key), &result.dptr, &result.dsize) != 0)
  840.               result.dptr = NULL;
  841. !         else
  842. !             /* smash newline */
  843. !             result.dptr[result.dsize--] = '\0';
  844.       }
  845.       else
  846.       {
  847. --- 937,946 ----
  848.               yp_match(yp_domain, &db->db_name[1], lowkey,
  849.               strlen(key), &result.dptr, &result.dsize) != 0)
  850.               result.dptr = NULL;
  851. !         /* smash newline if supplied */
  852. !         else if (result.dptr[result.dsize] == '\n')
  853. !             result.dptr[result.dsize] = '\0';
  854.       }
  855.       else
  856.       {
  857. diff -r -c -b sendmail-5.65c/src/deliver.c sendmail/src/deliver.c
  858. *** sendmail-5.65c/src/deliver.c    Fri Jun 21 06:45:58 1991
  859. --- sendmail/src/deliver.c    Sun Aug 11 20:36:59 1991
  860. ***************
  861. *** 20,26 ****
  862.   
  863.   #ifndef lint
  864.   static char sccsid[] = "@(#)deliver.c    5.38 (Berkeley) 6/1/90";
  865. ! static char  rcsid[] = "@(#)$Id: deliver.c,v 5.38.0.31 1991/06/21 12:45:31 paul Exp $";
  866.   #endif /* not lint */
  867.   
  868.   #include "sendmail.h"
  869. --- 20,26 ----
  870.   
  871.   #ifndef lint
  872.   static char sccsid[] = "@(#)deliver.c    5.38 (Berkeley) 6/1/90";
  873. ! static char  rcsid[] = "@(#)$Id: deliver.c,v 5.38.0.32 1991/08/12 02:36:50 paul Exp $";
  874.   #endif /* not lint */
  875.   
  876.   #include "sendmail.h"
  877. ***************
  878. *** 1265,1307 ****
  879.       const char *stat;
  880.   {
  881.   # ifdef LOG
  882.   #  if defined(hpux)
  883. ! #   define LOGSPLIT 128
  884.   #  else /* hpux */
  885. ! #   define LOGSPLIT 900
  886.   # endif /* hpux */
  887.       register char *p, *q;
  888.   
  889.       /*
  890. !     ** Split up long To: lines, since the buffer in
  891. !     ** syslog() on various systems isn't large enough.
  892.       */
  893.       p = CurEnv->e_to;
  894. !     while (strlen(p) >= LOGSPLIT)
  895. !     {
  896. !         if ((q = index(p + LOGSPLIT, ',')) != NULL)
  897. !         {
  898.               if (m == NULL)
  899. !                 syslog(LOG_INFO, "%s: to=%.*s(cont'd), delay=%s, stat=%s",
  900. !                     CurEnv->e_id, q - p + 1, p,
  901.                       pintvl(curtime()-CurEnv->e_ctime, TRUE),
  902.                       stat);
  903.               else
  904. !                 syslog(LOG_INFO, "%s: to=%.*s(cont'd), delay=%s, stat=%s, mailer=%s",
  905. !                     CurEnv->e_id, q - p + 1, p,
  906.                       pintvl(curtime()-CurEnv->e_ctime, TRUE),
  907.                       stat, m->m_name);
  908.               p = q + 1;
  909.           }
  910.           else
  911.               break;
  912.       }
  913. !     if (m == NULL)
  914. !         syslog(LOG_INFO, "%s: to=%s, delay=%s, stat=%s", CurEnv->e_id,
  915. !             p, pintvl(curtime() - CurEnv->e_ctime, TRUE), stat);
  916. !     else
  917. !         syslog(LOG_INFO, "%s: to=%s, delay=%s, stat=%s, mailer=%s",
  918. !             CurEnv->e_id, p, pintvl(curtime()-CurEnv->e_ctime,TRUE),             stat, m->m_name);
  919.   # endif /* LOG */
  920.   }
  921.    /*
  922. --- 1265,1324 ----
  923.       const char *stat;
  924.   {
  925.   # ifdef LOG
  926. +     /*
  927. +     ** These buffer sizes are based on the total bufsize available in the
  928. +     ** syslog() implementation. On BSD based systems the buffer is 1024,
  929. +     ** on HP-UX it is only 256 bytes. These sizes are less to allow
  930. +     ** for the header that syslog prepends to the messages which are sent
  931. +     ** below. Overflow of the buffer can result in duplicate mail messages
  932. +     ** to long lists.
  933. +     */
  934.   #  if defined(hpux)
  935. ! #   define LOG_BUFSIZE 156
  936.   #  else /* hpux */
  937. ! #   define LOG_BUFSIZE 900
  938.   # endif /* hpux */
  939.       register char *p, *q;
  940. +     register int logsplit;
  941. +     char trailer[128];
  942.               
  943.       /*
  944. !     ** Split up long To: lines, since the buffer in syslog() on various
  945. !     ** systems isn't large enough.  Some syslog() implementations, e.g.,
  946. !     ** Ultrix, limit the number of printf parameters to 5.
  947.       */
  948.       p = CurEnv->e_to;
  949. !     /*
  950. !     ** Take care that the info going into trailer[] is less than
  951. !     ** 128 bytes long. If it gets that big then on systems with
  952. !     ** short syslog buffers we won't get many addresses in anyway.
  953. !     */
  954.       if (m == NULL)
  955. !     {
  956. !         (void) sprintf(trailer,"delay=%s, stat=%s",
  957.                  pintvl(curtime()-CurEnv->e_ctime, TRUE),
  958.                  stat);
  959. +     }
  960.       else        
  961. !     {
  962. !         (void) sprintf(trailer,"delay=%s, stat=%s, mailer=%s",
  963.                  pintvl(curtime()-CurEnv->e_ctime, TRUE),
  964.                  stat, m->m_name);
  965. +     }
  966. +     logsplit = LOG_BUFSIZE - strlen(trailer);
  967. +     while (strlen(p) >= logsplit)
  968. +     {
  969. +         if ((q = index(p + logsplit, ',')) != NULL)
  970. +         {
  971. +                 syslog(LOG_INFO, "%s: to=%.*s(cont'd), %s",
  972. +                    CurEnv->e_id, q - p + 1, p, trailer);
  973.                   p = q + 1;
  974.           }
  975.           else
  976.               break;
  977.       }
  978. !     syslog(LOG_INFO, "%s: to=%s, %s", CurEnv->e_id, p, trailer);
  979.   # endif /* LOG */
  980.   }
  981.    /*
  982. diff -r -c -b sendmail-5.65c/src/main.c sendmail/src/main.c
  983. *** sendmail-5.65c/src/main.c    Mon Jun 24 23:25:44 1991
  984. --- sendmail/src/main.c    Tue Aug  6 12:17:26 1991
  985. ***************
  986. *** 25,31 ****
  987.   "@(#) Copyright (c) 1988 Regents of the University of California.\n\
  988.    All rights reserved.\n";
  989.   static char sccsid[] = "@(#)main.c    5.31 (Berkeley) 7/20/90";
  990. ! static char  rcsid[] = "@(#)$Id: main.c,v 5.29.0.33 1991/06/25 05:25:13 paul Exp $";
  991.   # ifdef    __GNUC__
  992.   static    char    compiled[] = "@(#)compiled by gcc version "__VERSION__;
  993.   # endif    /* __GNUC__ */
  994. --- 25,31 ----
  995.   "@(#) Copyright (c) 1988 Regents of the University of California.\n\
  996.    All rights reserved.\n";
  997.   static char sccsid[] = "@(#)main.c    5.31 (Berkeley) 7/20/90";
  998. ! static char  rcsid[] = "@(#)$Id: main.c,v 5.29.0.36 1991/08/06 18:17:12 paul Exp $";
  999.   # ifdef    __GNUC__
  1000.   static    char    compiled[] = "@(#)compiled by gcc version "__VERSION__;
  1001.   # endif    /* __GNUC__ */
  1002. ***************
  1003. *** 210,229 ****
  1004.       STRUCTCOPY(NullAddress, MainEnvelope.e_from);
  1005.   
  1006.       argv[argc] = NULL;
  1007. - #ifdef notdef
  1008. -     /* Print the argument list when debugging */
  1009. -     {
  1010. -         char    *cmdline = xalloc(MAXLINE);
  1011. -         for (*cmdline = '\0', av = argv; *av; av++)
  1012. -         {
  1013. -             (void) strcat(cmdline, *av);
  1014. -             (void) strcat(cmdline, " ");
  1015. -         }
  1016. -         syslog(LOG_DEBUG, "Invoked as: %s", cmdline);
  1017. -         free(cmdline);
  1018. -     }
  1019. - #endif /* notdef */
  1020.       av = argv;
  1021.       nothaw = FALSE;
  1022.   
  1023. --- 210,215 ----
  1024. ***************
  1025. *** 360,370 ****
  1026.                   if (tTd(0, 4))
  1027.                       printf("UUCP nodename: %s\n",
  1028.                           utsname.nodename);
  1029. ! # ifdef LOG
  1030. !                 syslog(LOG_NOTICE, "UUCP nodename (%s) and lowest level of canonical name (%s) differ",
  1031. !                     utsname.nodename, jbuf);
  1032. ! # endif /* LOG */
  1033. !             } else
  1034.   #endif /* HAS_UNAME */
  1035.               define('k', newstr(jbuf), CurEnv);
  1036.           }
  1037. --- 346,353 ----
  1038.                   if (tTd(0, 4))
  1039.                       printf("UUCP nodename: %s\n",
  1040.                           utsname.nodename);
  1041. !             }
  1042. !             else
  1043.   #endif /* HAS_UNAME */
  1044.               define('k', newstr(jbuf), CurEnv);
  1045.           }
  1046. ***************
  1047. *** 649,654 ****
  1048. --- 632,671 ----
  1049.           break;
  1050.       }
  1051.   
  1052. + #ifdef notdef
  1053. +     /*
  1054. +      * Print the argument list when debugging.  This has to come after the
  1055. +      * freeze() statement as the first syslog() call sets a state variable
  1056. +      * that won't get saved or restored.
  1057. +      */
  1058. +     {
  1059. +         char    *cmdline = xalloc(MAXLINE);
  1060. +         for (*cmdline = '\0', av = argv; *av; av++)
  1061. +         {
  1062. +             (void) strcat(cmdline, *av);
  1063. +             (void) strcat(cmdline, " ");
  1064. +         }
  1065. +         syslog(LOG_DEBUG, "Invoked as: %s", cmdline);
  1066. +         free(cmdline);
  1067. +     }
  1068. + #endif /* notdef */
  1069. +     /*
  1070. +      *    The call to setdefuser() is moved from readcf.c to here.
  1071. +      *    The result is only used in deliver.c, so delaying it until
  1072. +      *    now should be safe.
  1073. +      *
  1074. +      *    The function setdefuser() looks up the passwd database.  In
  1075. +      *    some systems, notably Suns, this may involve a YP lookup.
  1076. +      *    Unfortunately YP lookups leave behind some state information
  1077. +      *    which seems to be incompatible with the freeze/thaw operations.
  1078. +      *
  1079. +      *    Placing the call here delays it till after the freeze/thaw
  1080. +      *    is complete.
  1081. +      */
  1082. +     setdefuser();
  1083.       /* do heuristic mode adjustment */
  1084.       if (Verbose)
  1085.       {
  1086. ***************
  1087. *** 1106,1112 ****
  1088.   
  1089.       if (freezefile == NULL)
  1090.           return;
  1091. ! # ifdef YP
  1092.       {
  1093.           /*
  1094.            * NIS (nee YP) state is saved in the freeze, the readback
  1095. --- 1123,1129 ----
  1096.   
  1097.       if (freezefile == NULL)
  1098.           return;
  1099. ! # ifdef notdef
  1100.       {
  1101.           /*
  1102.            * NIS (nee YP) state is saved in the freeze, the readback
  1103. ***************
  1104. *** 1186,1198 ****
  1105.       if (f < 0)
  1106.       {
  1107.   # ifdef LOG
  1108. !         syslog(LOG_WARNING, "Cannot open frozen config file %s: %m",
  1109.               freezefile);
  1110.   # endif /* LOG */
  1111.           errno = 0;
  1112.           return (FALSE);
  1113.       }
  1114. ! # ifdef YP
  1115.       {
  1116.           /*
  1117.            * NIS (nee YP) state is saved in the freeze, the readback
  1118. --- 1203,1215 ----
  1119.       if (f < 0)
  1120.       {
  1121.   # ifdef LOG
  1122. !         syslog(LOG_NOTICE, "Cannot open frozen config file %s: %m",
  1123.               freezefile);
  1124.   # endif /* LOG */
  1125.           errno = 0;
  1126.           return (FALSE);
  1127.       }
  1128. ! # ifdef notdef
  1129.       {
  1130.           /*
  1131.            * NIS (nee YP) state is saved in the freeze, the readback
  1132. diff -r -c -b sendmail-5.65c/src/readcf.c sendmail/src/readcf.c
  1133. *** sendmail-5.65c/src/readcf.c    Mon Jun 24 10:20:51 1991
  1134. --- sendmail/src/readcf.c    Tue Aug  6 12:17:15 1991
  1135. ***************
  1136. *** 20,26 ****
  1137.   
  1138.   #ifndef lint
  1139.   static char sccsid[] = "@(#)readcf.c    5.21 (Berkeley) 6/1/90";
  1140. ! static char  rcsid[] = "@(#)$Id: readcf.c,v 5.21.0.13 1991/06/24 16:20:25 paul Exp $";
  1141.   #endif /* not lint */
  1142.   
  1143.   #include "sendmail.h"
  1144. --- 20,26 ----
  1145.   
  1146.   #ifndef lint
  1147.   static char sccsid[] = "@(#)readcf.c    5.21 (Berkeley) 6/1/90";
  1148. ! static char  rcsid[] = "@(#)$Id: readcf.c,v 5.21.0.15 1991/08/06 18:17:12 paul Exp $";
  1149.   #endif /* not lint */
  1150.   
  1151.   #include "sendmail.h"
  1152. ***************
  1153. *** 101,107 ****
  1154.           exit(EX_OSFILE);
  1155.       }
  1156.   
  1157. !     setdefuser();
  1158.       FileName = cfname;
  1159.       LineNumber = 0;
  1160.       while (fgetfolded(buf, sizeof buf, cf) != NULL)
  1161. --- 101,107 ----
  1162.           exit(EX_OSFILE);
  1163.       }
  1164.   
  1165. !     /* setdefuser(); Moved to main.c - see comments there */
  1166.       FileName = cfname;
  1167.       LineNumber = 0;
  1168.       while (fgetfolded(buf, sizeof buf, cf) != NULL)
  1169. ***************
  1170. *** 1034,1042 ****
  1171.           break;
  1172.   
  1173.         case 'N':        /* home (local?) network name */
  1174. ! # ifdef LOG
  1175. !         syslog(LOG_ERR, "'%c' option is obsolete", opt);
  1176. ! # endif /* LOG */
  1177.           break;
  1178.   
  1179.         case 'o':        /* assume old style headers */
  1180. --- 1034,1040 ----
  1181.           break;
  1182.   
  1183.         case 'N':        /* home (local?) network name */
  1184. !         syserr("Option N is obsolete (ON in sendmail.cf or -oN on command line)");
  1185.           break;
  1186.   
  1187.         case 'o':        /* assume old style headers */
  1188. ***************
  1189. *** 1085,1091 ****
  1190.   
  1191.         case 'u':        /* set default uid */
  1192.           DefUid = atoi(val);
  1193. !         setdefuser();
  1194.           break;
  1195.   
  1196.         case 'v':        /* run in verbose mode */
  1197. --- 1083,1089 ----
  1198.   
  1199.         case 'u':        /* set default uid */
  1200.           DefUid = atoi(val);
  1201. !         /* setdefuser(); Moved to main.c - see comments there */
  1202.           break;
  1203.   
  1204.         case 'v':        /* run in verbose mode */
  1205. diff -r -c -b sendmail-5.65c/src/recipient.c sendmail/src/recipient.c
  1206. *** sendmail-5.65c/src/recipient.c    Mon Jun 24 10:22:34 1991
  1207. --- sendmail/src/recipient.c    Thu Aug  8 16:13:17 1991
  1208. ***************
  1209. *** 20,26 ****
  1210.   
  1211.   #ifndef lint
  1212.   static char sccsid[] = "@(#)recipient.c    5.18 (Berkeley) 6/1/90";
  1213. ! static char  rcsid[] = "@(#)$Id: recipient.c,v 5.18.0.12 1991/06/24 16:21:32 paul Exp $";
  1214.   #endif /* not lint */
  1215.   
  1216.   #include "sendmail.h"
  1217. --- 20,26 ----
  1218.   
  1219.   #ifndef lint
  1220.   static char sccsid[] = "@(#)recipient.c    5.18 (Berkeley) 6/1/90";
  1221. ! static char  rcsid[] = "@(#)$Id: recipient.c,v 5.18.0.13 1991/08/08 22:13:13 paul Exp $";
  1222.   #endif /* not lint */
  1223.   
  1224.   #include "sendmail.h"
  1225. ***************
  1226. *** 638,643 ****
  1227. --- 638,646 ----
  1228.           ctladdr->q_gid = st.st_gid;
  1229.           ctladdr->q_flags |= QGOODUID;
  1230.       }
  1231. +     /* sendtolist() detects possible self-refs in any line of this file */
  1232. +     ctladdr->q_flags &= ~QSELFREF;
  1233.   
  1234.       /* read the file -- each line is a comma-separated list. */
  1235.       FileName = (char *)fname;
  1236. diff -r -c -b sendmail-5.65c/src/util.c sendmail/src/util.c
  1237. *** sendmail-5.65c/src/util.c    Mon Jun 24 14:32:09 1991
  1238. --- sendmail/src/util.c    Thu Aug  8 16:08:22 1991
  1239. ***************
  1240. *** 20,26 ****
  1241.   
  1242.   #ifndef lint
  1243.   static char sccsid[] = "@(#)util.c    5.18 (Berkeley) 6/1/90";
  1244. ! static char  rcsid[] = "@(#)$Id: util.c,v 5.18.0.13 1991/06/24 20:31:52 paul Exp $";
  1245.   #endif /* not lint */
  1246.   
  1247.   #include "sendmail.h"
  1248. --- 20,26 ----
  1249.   
  1250.   #ifndef lint
  1251.   static char sccsid[] = "@(#)util.c    5.18 (Berkeley) 6/1/90";
  1252. ! static char  rcsid[] = "@(#)$Id: util.c,v 5.18.0.14 1991/08/08 22:08:18 paul Exp $";
  1253.   #endif /* not lint */
  1254.   
  1255.   #include "sendmail.h"
  1256. ***************
  1257. *** 438,444 ****
  1258.   {
  1259.       struct stat stbuf;
  1260.   
  1261. !     if (stat(fn, &stbuf) >= 0 && stbuf.st_uid == uid &&
  1262.           (stbuf.st_mode & mode) == mode)
  1263.           return (TRUE);
  1264.       errno = 0;
  1265. --- 438,444 ----
  1266.   {
  1267.       struct stat stbuf;
  1268.   
  1269. !     if (stat(fn, &stbuf) >= 0 && stbuf.st_uid == (uid_t) uid &&
  1270.           (stbuf.st_mode & mode) == mode)
  1271.           return (TRUE);
  1272.       errno = 0;
  1273. diff -r -c -b sendmail-5.65c/support/strcasecmp.c sendmail/support/strcasecmp.c
  1274. *** sendmail-5.65c/support/strcasecmp.c    Sun Jun 16 15:54:19 1991
  1275. --- sendmail/support/strcasecmp.c    Wed Aug  7 09:00:09 1991
  1276. ***************
  1277. *** 83,89 ****
  1278.   #ifdef __STDC__
  1279.   strncasecmp(const char *s1, const char *s2, int n)
  1280.   #else /* !__STDC__ */
  1281. ! strncasecmp(s1, s2)
  1282.       char *s1, *s2;
  1283.       register int n;
  1284.   #endif /* __STDC__ */
  1285. --- 83,89 ----
  1286.   #ifdef __STDC__
  1287.   strncasecmp(const char *s1, const char *s2, int n)
  1288.   #else /* !__STDC__ */
  1289. ! strncasecmp(s1, s2, n)
  1290.       char *s1, *s2;
  1291.       register int n;
  1292.   #endif /* __STDC__ */
  1293.